<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script type="text/javascript">
        // 1.   1-100之间偶数相加，求加到几的时候和超过1000：**
        var a=0; 
        var b=0;
        while (a<=100) {
            if(a%2!=0){
                a++;
                continue;

              
            }else{
                b+=a;
                a++;
            }
            if(b>=1000){
                    break;
                    
                }

        }
        console.log(b)


        //2.   1-100之间偶数相加，能被7整除的数字不参加累加运算，求和
        var c=0;
        var d=0;
        while (c<=100) {
            if(c%2!=0 || c%7==0 ){
                c++;
                continue;
            }
          
            else{
          
                d+=c;
                c++;
            }
            
          
        }
        console.log(d);
        //3.   求199-2022的润年
        var year =199;

        while (year<=2022) {
            if(year%400==0 ){
                year++;
             
            }else if(year%4==0 && year%100!=0){
                year++;
            }
            
            else{
                year++;
                continue;
            }
            console.log(year-1)
        }
       //4. 输入分数，如果分数在  90-100: A  80-89：B     60-79：C      小于60：D
	   //考虑分数不合法
      var score=prompt('请输入分数');
      if(score>=90&&score<=100){
        console.log('A')
      }else if(score>=80&&score<=89){
        console.log('B ')
      }else if(score>=60&&score<=79){
        console.log('C')
      }else{
        console.log('D')
      }

    </script>
</body>
</html>